package cn.wolfcode.wechat.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 用户菜单
 * @author chu
 */

@Getter
@Setter
public class Menu extends BaseDomain{
    private String name;
    private String key;
    private String type;
    private String url;
    private Long parentId;

    private List<Menu> sub_button;

    public String getJsonString(){
        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("key",key);
        map.put("type",type);
        map.put("url",url);
        map.put("parentId",parentId);
        return JSON.toJSONString(map);
    }
}
